Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(odds) → mark(incr(pairs))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
active(head(cons(X, XS))) → mark(X)
active(tail(cons(X, XS))) → mark(XS)
mark(nats) → active(nats)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(incr(X)) → active(incr(mark(X)))
mark(pairs) → active(pairs)
mark(odds) → active(odds)
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
incr(mark(X)) → incr(X)
incr(active(X)) → incr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)

Q is empty.


QTRS
  ↳ RRRPoloQTRSProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(odds) → mark(incr(pairs))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
active(head(cons(X, XS))) → mark(X)
active(tail(cons(X, XS))) → mark(XS)
mark(nats) → active(nats)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(incr(X)) → active(incr(mark(X)))
mark(pairs) → active(pairs)
mark(odds) → active(odds)
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
incr(mark(X)) → incr(X)
incr(active(X)) → incr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)

Q is empty.

The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:

active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(odds) → mark(incr(pairs))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
active(head(cons(X, XS))) → mark(X)
active(tail(cons(X, XS))) → mark(XS)
mark(nats) → active(nats)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(incr(X)) → active(incr(mark(X)))
mark(pairs) → active(pairs)
mark(odds) → active(odds)
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
incr(mark(X)) → incr(X)
incr(active(X)) → incr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)

Q is empty.
The following rules can be removed by the rule removal processor [15] because they are oriented strictly by a polynomial ordering:

active(head(cons(X, XS))) → mark(X)
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = 2·x1 + 2·x2   
POL(head(x1)) = 1 + x1   
POL(incr(x1)) = x1   
POL(mark(x1)) = x1   
POL(nats) = 0   
POL(odds) = 0   
POL(pairs) = 0   
POL(s(x1)) = x1   
POL(tail(x1)) = 2·x1   




↳ QTRS
  ↳ RRRPoloQTRSProof
QTRS
      ↳ RRRPoloQTRSProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(odds) → mark(incr(pairs))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
active(tail(cons(X, XS))) → mark(XS)
mark(nats) → active(nats)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(incr(X)) → active(incr(mark(X)))
mark(pairs) → active(pairs)
mark(odds) → active(odds)
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
incr(mark(X)) → incr(X)
incr(active(X)) → incr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)

Q is empty.

The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:

active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(odds) → mark(incr(pairs))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
active(tail(cons(X, XS))) → mark(XS)
mark(nats) → active(nats)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(incr(X)) → active(incr(mark(X)))
mark(pairs) → active(pairs)
mark(odds) → active(odds)
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
incr(mark(X)) → incr(X)
incr(active(X)) → incr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)

Q is empty.
The following rules can be removed by the rule removal processor [15] because they are oriented strictly by a polynomial ordering:

active(tail(cons(X, XS))) → mark(XS)
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(head(x1)) = 2·x1   
POL(incr(x1)) = 2·x1   
POL(mark(x1)) = x1   
POL(nats) = 0   
POL(odds) = 0   
POL(pairs) = 0   
POL(s(x1)) = x1   
POL(tail(x1)) = 2 + x1   




↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
QTRS
          ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(odds) → mark(incr(pairs))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
mark(nats) → active(nats)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(incr(X)) → active(incr(mark(X)))
mark(pairs) → active(pairs)
mark(odds) → active(odds)
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
incr(mark(X)) → incr(X)
incr(active(X)) → incr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)
ACTIVE(nats) → CONS(0, incr(nats))
MARK(s(X)) → MARK(X)
MARK(incr(X)) → INCR(mark(X))
TAIL(active(X)) → TAIL(X)
MARK(tail(X)) → MARK(X)
MARK(head(X)) → MARK(X)
MARK(incr(X)) → ACTIVE(incr(mark(X)))
MARK(incr(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
CONS(X1, mark(X2)) → CONS(X1, X2)
INCR(active(X)) → INCR(X)
HEAD(mark(X)) → HEAD(X)
CONS(X1, active(X2)) → CONS(X1, X2)
MARK(pairs) → ACTIVE(pairs)
MARK(s(X)) → ACTIVE(s(mark(X)))
ACTIVE(nats) → INCR(nats)
MARK(odds) → ACTIVE(odds)
ACTIVE(odds) → MARK(incr(pairs))
ACTIVE(odds) → INCR(pairs)
ACTIVE(incr(cons(X, XS))) → S(X)
ACTIVE(incr(cons(X, XS))) → INCR(XS)
MARK(head(X)) → HEAD(mark(X))
S(active(X)) → S(X)
S(mark(X)) → S(X)
INCR(mark(X)) → INCR(X)
MARK(tail(X)) → TAIL(mark(X))
MARK(s(X)) → S(mark(X))
ACTIVE(incr(cons(X, XS))) → MARK(cons(s(X), incr(XS)))
ACTIVE(pairs) → INCR(odds)
MARK(cons(X1, X2)) → CONS(mark(X1), X2)
ACTIVE(pairs) → CONS(0, incr(odds))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(tail(X)) → ACTIVE(tail(mark(X)))
MARK(head(X)) → ACTIVE(head(mark(X)))
HEAD(active(X)) → HEAD(X)
TAIL(mark(X)) → TAIL(X)
ACTIVE(incr(cons(X, XS))) → CONS(s(X), incr(XS))
ACTIVE(pairs) → MARK(cons(0, incr(odds)))
MARK(0) → ACTIVE(0)
CONS(active(X1), X2) → CONS(X1, X2)
ACTIVE(nats) → MARK(cons(0, incr(nats)))
MARK(nats) → ACTIVE(nats)

The TRS R consists of the following rules:

active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(odds) → mark(incr(pairs))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
mark(nats) → active(nats)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(incr(X)) → active(incr(mark(X)))
mark(pairs) → active(pairs)
mark(odds) → active(odds)
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
incr(mark(X)) → incr(X)
incr(active(X)) → incr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
QDP
              ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)
ACTIVE(nats) → CONS(0, incr(nats))
MARK(s(X)) → MARK(X)
MARK(incr(X)) → INCR(mark(X))
TAIL(active(X)) → TAIL(X)
MARK(tail(X)) → MARK(X)
MARK(head(X)) → MARK(X)
MARK(incr(X)) → ACTIVE(incr(mark(X)))
MARK(incr(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
CONS(X1, mark(X2)) → CONS(X1, X2)
INCR(active(X)) → INCR(X)
HEAD(mark(X)) → HEAD(X)
CONS(X1, active(X2)) → CONS(X1, X2)
MARK(pairs) → ACTIVE(pairs)
MARK(s(X)) → ACTIVE(s(mark(X)))
ACTIVE(nats) → INCR(nats)
MARK(odds) → ACTIVE(odds)
ACTIVE(odds) → MARK(incr(pairs))
ACTIVE(odds) → INCR(pairs)
ACTIVE(incr(cons(X, XS))) → S(X)
ACTIVE(incr(cons(X, XS))) → INCR(XS)
MARK(head(X)) → HEAD(mark(X))
S(active(X)) → S(X)
S(mark(X)) → S(X)
INCR(mark(X)) → INCR(X)
MARK(tail(X)) → TAIL(mark(X))
MARK(s(X)) → S(mark(X))
ACTIVE(incr(cons(X, XS))) → MARK(cons(s(X), incr(XS)))
ACTIVE(pairs) → INCR(odds)
MARK(cons(X1, X2)) → CONS(mark(X1), X2)
ACTIVE(pairs) → CONS(0, incr(odds))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(tail(X)) → ACTIVE(tail(mark(X)))
MARK(head(X)) → ACTIVE(head(mark(X)))
HEAD(active(X)) → HEAD(X)
TAIL(mark(X)) → TAIL(X)
ACTIVE(incr(cons(X, XS))) → CONS(s(X), incr(XS))
ACTIVE(pairs) → MARK(cons(0, incr(odds)))
MARK(0) → ACTIVE(0)
CONS(active(X1), X2) → CONS(X1, X2)
ACTIVE(nats) → MARK(cons(0, incr(nats)))
MARK(nats) → ACTIVE(nats)

The TRS R consists of the following rules:

active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(odds) → mark(incr(pairs))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
mark(nats) → active(nats)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(incr(X)) → active(incr(mark(X)))
mark(pairs) → active(pairs)
mark(odds) → active(odds)
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
incr(mark(X)) → incr(X)
incr(active(X)) → incr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 6 SCCs with 14 less nodes.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
QDP
                    ↳ UsableRulesProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

TAIL(active(X)) → TAIL(X)
TAIL(mark(X)) → TAIL(X)

The TRS R consists of the following rules:

active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(odds) → mark(incr(pairs))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
mark(nats) → active(nats)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(incr(X)) → active(incr(mark(X)))
mark(pairs) → active(pairs)
mark(odds) → active(odds)
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
incr(mark(X)) → incr(X)
incr(active(X)) → incr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ UsableRulesProof
QDP
                        ↳ QDPSizeChangeProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

TAIL(active(X)) → TAIL(X)
TAIL(mark(X)) → TAIL(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
QDP
                    ↳ UsableRulesProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

HEAD(mark(X)) → HEAD(X)
HEAD(active(X)) → HEAD(X)

The TRS R consists of the following rules:

active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(odds) → mark(incr(pairs))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
mark(nats) → active(nats)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(incr(X)) → active(incr(mark(X)))
mark(pairs) → active(pairs)
mark(odds) → active(odds)
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
incr(mark(X)) → incr(X)
incr(active(X)) → incr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
QDP
                        ↳ QDPSizeChangeProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

HEAD(mark(X)) → HEAD(X)
HEAD(active(X)) → HEAD(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
QDP
                    ↳ UsableRulesProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(mark(X)) → S(X)
S(active(X)) → S(X)

The TRS R consists of the following rules:

active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(odds) → mark(incr(pairs))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
mark(nats) → active(nats)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(incr(X)) → active(incr(mark(X)))
mark(pairs) → active(pairs)
mark(odds) → active(odds)
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
incr(mark(X)) → incr(X)
incr(active(X)) → incr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
QDP
                        ↳ QDPSizeChangeProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(active(X)) → S(X)
S(mark(X)) → S(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
QDP
                    ↳ UsableRulesProof
                  ↳ QDP
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

INCR(mark(X)) → INCR(X)
INCR(active(X)) → INCR(X)

The TRS R consists of the following rules:

active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(odds) → mark(incr(pairs))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
mark(nats) → active(nats)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(incr(X)) → active(incr(mark(X)))
mark(pairs) → active(pairs)
mark(odds) → active(odds)
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
incr(mark(X)) → incr(X)
incr(active(X)) → incr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
QDP
                        ↳ QDPSizeChangeProof
                  ↳ QDP
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

INCR(mark(X)) → INCR(X)
INCR(active(X)) → INCR(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
QDP
                    ↳ UsableRulesProof
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(X1, active(X2)) → CONS(X1, X2)
CONS(mark(X1), X2) → CONS(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)
CONS(X1, mark(X2)) → CONS(X1, X2)

The TRS R consists of the following rules:

active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(odds) → mark(incr(pairs))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
mark(nats) → active(nats)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(incr(X)) → active(incr(mark(X)))
mark(pairs) → active(pairs)
mark(odds) → active(odds)
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
incr(mark(X)) → incr(X)
incr(active(X)) → incr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
QDP
                        ↳ QDPSizeChangeProof
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)
CONS(X1, active(X2)) → CONS(X1, X2)
CONS(X1, mark(X2)) → CONS(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
QDP
                    ↳ RuleRemovalProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(incr(cons(X, XS))) → MARK(cons(s(X), incr(XS)))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(s(X)) → MARK(X)
MARK(tail(X)) → MARK(X)
MARK(head(X)) → MARK(X)
MARK(tail(X)) → ACTIVE(tail(mark(X)))
MARK(head(X)) → ACTIVE(head(mark(X)))
MARK(incr(X)) → ACTIVE(incr(mark(X)))
MARK(incr(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(pairs) → ACTIVE(pairs)
ACTIVE(pairs) → MARK(cons(0, incr(odds)))
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(odds) → ACTIVE(odds)
ACTIVE(odds) → MARK(incr(pairs))
ACTIVE(nats) → MARK(cons(0, incr(nats)))
MARK(nats) → ACTIVE(nats)

The TRS R consists of the following rules:

active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(odds) → mark(incr(pairs))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
mark(nats) → active(nats)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(incr(X)) → active(incr(mark(X)))
mark(pairs) → active(pairs)
mark(odds) → active(odds)
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
incr(mark(X)) → incr(X)
incr(active(X)) → incr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

MARK(tail(X)) → MARK(X)


Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = x1   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(head(x1)) = x1   
POL(incr(x1)) = x1   
POL(mark(x1)) = x1   
POL(nats) = 0   
POL(odds) = 0   
POL(pairs) = 0   
POL(s(x1)) = x1   
POL(tail(x1)) = 1 + x1   



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ RuleRemovalProof
QDP
                        ↳ RuleRemovalProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(incr(cons(X, XS))) → MARK(cons(s(X), incr(XS)))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(s(X)) → MARK(X)
MARK(head(X)) → MARK(X)
MARK(tail(X)) → ACTIVE(tail(mark(X)))
MARK(head(X)) → ACTIVE(head(mark(X)))
MARK(incr(X)) → ACTIVE(incr(mark(X)))
MARK(incr(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(pairs) → ACTIVE(pairs)
ACTIVE(pairs) → MARK(cons(0, incr(odds)))
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(odds) → ACTIVE(odds)
ACTIVE(odds) → MARK(incr(pairs))
ACTIVE(nats) → MARK(cons(0, incr(nats)))
MARK(nats) → ACTIVE(nats)

The TRS R consists of the following rules:

active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(odds) → mark(incr(pairs))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
mark(nats) → active(nats)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(incr(X)) → active(incr(mark(X)))
mark(pairs) → active(pairs)
mark(odds) → active(odds)
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
incr(mark(X)) → incr(X)
incr(active(X)) → incr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

MARK(head(X)) → MARK(X)


Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = 2·x1   
POL(MARK(x1)) = 2·x1   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = x1 + 2·x2   
POL(head(x1)) = 1 + x1   
POL(incr(x1)) = x1   
POL(mark(x1)) = x1   
POL(nats) = 0   
POL(odds) = 0   
POL(pairs) = 0   
POL(s(x1)) = x1   
POL(tail(x1)) = 2·x1   



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ RuleRemovalProof
                      ↳ QDP
                        ↳ RuleRemovalProof
QDP
                            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(incr(cons(X, XS))) → MARK(cons(s(X), incr(XS)))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(s(X)) → MARK(X)
MARK(tail(X)) → ACTIVE(tail(mark(X)))
MARK(head(X)) → ACTIVE(head(mark(X)))
MARK(incr(X)) → ACTIVE(incr(mark(X)))
MARK(incr(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(pairs) → ACTIVE(pairs)
ACTIVE(pairs) → MARK(cons(0, incr(odds)))
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(odds) → ACTIVE(odds)
ACTIVE(odds) → MARK(incr(pairs))
ACTIVE(nats) → MARK(cons(0, incr(nats)))
MARK(nats) → ACTIVE(nats)

The TRS R consists of the following rules:

active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(odds) → mark(incr(pairs))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
mark(nats) → active(nats)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(incr(X)) → active(incr(mark(X)))
mark(pairs) → active(pairs)
mark(odds) → active(odds)
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
incr(mark(X)) → incr(X)
incr(active(X)) → incr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


ACTIVE(pairs) → MARK(cons(0, incr(odds)))
ACTIVE(odds) → MARK(incr(pairs))
The remaining pairs can at least be oriented weakly.

ACTIVE(incr(cons(X, XS))) → MARK(cons(s(X), incr(XS)))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(s(X)) → MARK(X)
MARK(tail(X)) → ACTIVE(tail(mark(X)))
MARK(head(X)) → ACTIVE(head(mark(X)))
MARK(incr(X)) → ACTIVE(incr(mark(X)))
MARK(incr(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(pairs) → ACTIVE(pairs)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(odds) → ACTIVE(odds)
ACTIVE(nats) → MARK(cons(0, incr(nats)))
MARK(nats) → ACTIVE(nats)
Used ordering: Combined order from the following AFS and order.
ACTIVE(x1)  =  ACTIVE(x1)
incr(x1)  =  x1
cons(x1, x2)  =  x1
MARK(x1)  =  MARK(x1)
s(x1)  =  x1
mark(x1)  =  x1
tail(x1)  =  x1
head(x1)  =  x1
pairs  =  pairs
0  =  0
odds  =  odds
nats  =  nats
active(x1)  =  x1

Recursive path order with status [2].
Quasi-Precedence:
[ACTIVE1, MARK1] > odds > pairs > [0, nats]

Status:
odds: multiset
MARK1: [1]
pairs: multiset
nats: multiset
0: multiset
ACTIVE1: [1]


The following usable rules [17] were oriented:

tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
head(active(X)) → head(X)
head(mark(X)) → head(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
mark(0) → active(0)
active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(odds) → active(odds)
mark(incr(X)) → active(incr(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(nats) → active(nats)
mark(pairs) → active(pairs)
mark(tail(X)) → active(tail(mark(X)))
active(odds) → mark(incr(pairs))
incr(active(X)) → incr(X)
incr(mark(X)) → incr(X)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ RuleRemovalProof
                      ↳ QDP
                        ↳ RuleRemovalProof
                          ↳ QDP
                            ↳ QDPOrderProof
QDP
                                ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(incr(cons(X, XS))) → MARK(cons(s(X), incr(XS)))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(s(X)) → MARK(X)
MARK(tail(X)) → ACTIVE(tail(mark(X)))
MARK(head(X)) → ACTIVE(head(mark(X)))
MARK(incr(X)) → ACTIVE(incr(mark(X)))
MARK(incr(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(pairs) → ACTIVE(pairs)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(odds) → ACTIVE(odds)
ACTIVE(nats) → MARK(cons(0, incr(nats)))
MARK(nats) → ACTIVE(nats)

The TRS R consists of the following rules:

active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(odds) → mark(incr(pairs))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
mark(nats) → active(nats)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(incr(X)) → active(incr(mark(X)))
mark(pairs) → active(pairs)
mark(odds) → active(odds)
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
incr(mark(X)) → incr(X)
incr(active(X)) → incr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 2 less nodes.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ RuleRemovalProof
                      ↳ QDP
                        ↳ RuleRemovalProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ DependencyGraphProof
QDP
                                    ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(incr(cons(X, XS))) → MARK(cons(s(X), incr(XS)))
MARK(s(X)) → MARK(X)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(tail(X)) → ACTIVE(tail(mark(X)))
MARK(head(X)) → ACTIVE(head(mark(X)))
MARK(incr(X)) → MARK(X)
MARK(incr(X)) → ACTIVE(incr(mark(X)))
MARK(cons(X1, X2)) → MARK(X1)
ACTIVE(nats) → MARK(cons(0, incr(nats)))
MARK(nats) → ACTIVE(nats)

The TRS R consists of the following rules:

active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(odds) → mark(incr(pairs))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
mark(nats) → active(nats)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(incr(X)) → active(incr(mark(X)))
mark(pairs) → active(pairs)
mark(odds) → active(odds)
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
incr(mark(X)) → incr(X)
incr(active(X)) → incr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


ACTIVE(nats) → MARK(cons(0, incr(nats)))
The remaining pairs can at least be oriented weakly.

ACTIVE(incr(cons(X, XS))) → MARK(cons(s(X), incr(XS)))
MARK(s(X)) → MARK(X)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(tail(X)) → ACTIVE(tail(mark(X)))
MARK(head(X)) → ACTIVE(head(mark(X)))
MARK(incr(X)) → MARK(X)
MARK(incr(X)) → ACTIVE(incr(mark(X)))
MARK(cons(X1, X2)) → MARK(X1)
MARK(nats) → ACTIVE(nats)
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = 1 + x1   
POL(MARK(x1)) = 1 + x1   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = x1   
POL(head(x1)) = 0   
POL(incr(x1)) = x1   
POL(mark(x1)) = x1   
POL(nats) = 1   
POL(odds) = 1   
POL(pairs) = 0   
POL(s(x1)) = x1   
POL(tail(x1)) = 1 + x1   

The following usable rules [17] were oriented:

tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
head(active(X)) → head(X)
head(mark(X)) → head(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
mark(0) → active(0)
active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(odds) → active(odds)
mark(incr(X)) → active(incr(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(nats) → active(nats)
mark(pairs) → active(pairs)
mark(tail(X)) → active(tail(mark(X)))
active(odds) → mark(incr(pairs))
incr(active(X)) → incr(X)
incr(mark(X)) → incr(X)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ RuleRemovalProof
                      ↳ QDP
                        ↳ RuleRemovalProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
QDP
                                        ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(incr(cons(X, XS))) → MARK(cons(s(X), incr(XS)))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(s(X)) → MARK(X)
MARK(incr(X)) → ACTIVE(incr(mark(X)))
MARK(incr(X)) → MARK(X)
MARK(head(X)) → ACTIVE(head(mark(X)))
MARK(tail(X)) → ACTIVE(tail(mark(X)))
MARK(cons(X1, X2)) → MARK(X1)
MARK(nats) → ACTIVE(nats)

The TRS R consists of the following rules:

active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(odds) → mark(incr(pairs))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
mark(nats) → active(nats)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(incr(X)) → active(incr(mark(X)))
mark(pairs) → active(pairs)
mark(odds) → active(odds)
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
incr(mark(X)) → incr(X)
incr(active(X)) → incr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ RuleRemovalProof
                      ↳ QDP
                        ↳ RuleRemovalProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ DependencyGraphProof
QDP
                                            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(incr(cons(X, XS))) → MARK(cons(s(X), incr(XS)))
MARK(s(X)) → MARK(X)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(tail(X)) → ACTIVE(tail(mark(X)))
MARK(head(X)) → ACTIVE(head(mark(X)))
MARK(incr(X)) → MARK(X)
MARK(incr(X)) → ACTIVE(incr(mark(X)))
MARK(cons(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(odds) → mark(incr(pairs))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
mark(nats) → active(nats)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(incr(X)) → active(incr(mark(X)))
mark(pairs) → active(pairs)
mark(odds) → active(odds)
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
incr(mark(X)) → incr(X)
incr(active(X)) → incr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


ACTIVE(incr(cons(X, XS))) → MARK(cons(s(X), incr(XS)))
MARK(incr(X)) → MARK(X)
The remaining pairs can at least be oriented weakly.

MARK(s(X)) → MARK(X)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(tail(X)) → ACTIVE(tail(mark(X)))
MARK(head(X)) → ACTIVE(head(mark(X)))
MARK(incr(X)) → ACTIVE(incr(mark(X)))
MARK(cons(X1, X2)) → MARK(X1)
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = x1   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = x1   
POL(head(x1)) = 0   
POL(incr(x1)) = 1 + x1   
POL(mark(x1)) = x1   
POL(nats) = 1   
POL(odds) = 1   
POL(pairs) = 0   
POL(s(x1)) = x1   
POL(tail(x1)) = 0   

The following usable rules [17] were oriented:

tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
head(active(X)) → head(X)
head(mark(X)) → head(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
mark(0) → active(0)
active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(odds) → active(odds)
mark(incr(X)) → active(incr(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(nats) → active(nats)
mark(pairs) → active(pairs)
mark(tail(X)) → active(tail(mark(X)))
active(odds) → mark(incr(pairs))
incr(active(X)) → incr(X)
incr(mark(X)) → incr(X)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ RuleRemovalProof
                      ↳ QDP
                        ↳ RuleRemovalProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
QDP
                                                ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(s(X)) → MARK(X)
MARK(incr(X)) → ACTIVE(incr(mark(X)))
MARK(head(X)) → ACTIVE(head(mark(X)))
MARK(tail(X)) → ACTIVE(tail(mark(X)))
MARK(cons(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(odds) → mark(incr(pairs))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
mark(nats) → active(nats)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(incr(X)) → active(incr(mark(X)))
mark(pairs) → active(pairs)
mark(odds) → active(odds)
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
incr(mark(X)) → incr(X)
incr(active(X)) → incr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 5 less nodes.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ RuleRemovalProof
                      ↳ QDP
                        ↳ RuleRemovalProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ DependencyGraphProof
QDP
                                                    ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

MARK(s(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

active(nats) → mark(cons(0, incr(nats)))
active(pairs) → mark(cons(0, incr(odds)))
active(odds) → mark(incr(pairs))
active(incr(cons(X, XS))) → mark(cons(s(X), incr(XS)))
mark(nats) → active(nats)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(incr(X)) → active(incr(mark(X)))
mark(pairs) → active(pairs)
mark(odds) → active(odds)
mark(s(X)) → active(s(mark(X)))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
incr(mark(X)) → incr(X)
incr(active(X)) → incr(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ RuleRemovalProof
                      ↳ QDP
                        ↳ RuleRemovalProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ DependencyGraphProof
                                                  ↳ QDP
                                                    ↳ UsableRulesProof
QDP
                                                        ↳ QDPSizeChangeProof

Q DP problem:
The TRS P consists of the following rules:

MARK(s(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs: